#ifndef DISCOVER_H_
#define DISCOVER_H_

#include "Com.h"

typedef enum {
	ST_DISC_NO_INIT,
	ST_DISC_RECV,

}enDiscoverSt;

typedef struct {
	int id;
	sockaddr_in addr;
}Nodo;

class Discover: public Com {
public:
	Discover();
	virtual ~Discover();
	bool tick();
	bool getNuevoNodo(Nodo *nodo);
private:
	enDiscoverSt estado;
	sockaddr_in DestAddr;
	Nodo nodo;

	bool validData(char* buff, int len);
};

#endif /* DISCOVER_H_ */
